Skip to content

chore: open-source contribution workflow — tests, CI, contributing guide#36

Merged
shaulams merged 3 commits into
mainfrom
chore/contribution-workflow
Mar 28, 2026
Merged

chore: open-source contribution workflow — tests, CI, contributing guide#36
shaulams merged 3 commits into
mainfrom
chore/contribution-workflow

Conversation

@shaulams
Copy link
Copy Markdown
Owner

What does this PR do?

Sets up a proper open-source contribution workflow for FieldCut:

1. Test Suite (52 tests)

  • test_helpers.pymerge_segments, friendly_error, get_clip_speaker logic
  • test_routes.py — all Flask endpoints: smoke tests, input validation, clip CRUD, project management, speakers, metadata, audio endpoints
  • test_pipeline.py — end-to-end: mark clips → cut with ffmpeg → verify output files; project save/load/duplicate/delete lifecycle; waveform extraction
  • No API keys required — external services are mocked/skipped

2. GitHub Actions CI

⚠️ Needs manual addition — the OAuth token doesn't have workflow scope. Please create .github/workflows/ci.yml manually (content below) or re-push with a PAT that has workflow permissions.

name: CI
on:
  pull_request:
    branches: [main]
  push:
    branches: [main]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - run: sudo apt-get update && sudo apt-get install -y ffmpeg
      - run: pip install -r requirements.txt && pip install pytest
      - run: pytest tests/ -v --tb=short

3. CONTRIBUTING.md

Clear instructions for contributors: fork, setup, run tests, branch naming, commit conventions, PR guidelines.

4. PR Template

Consistent format with checklist: change type, testing steps, screenshots for UI changes.

5. Branch Protection (manual)

After merging, enable branch protection on main:

  • Settings → Branches → Add rule for main
  • ✅ Require status checks to pass (select the CI job)
  • ✅ Require pull request reviews

Type of change

  • New feature (contribution infrastructure)

How to test

pip install pytest
pytest tests/ -v

Checklist

  • Tested locally (52/52 passing)
  • Tests included
  • Documentation updated (CONTRIBUTING.md)

- 52 pytest tests covering routes, helpers, clip operations, cutting
  pipeline, project management, speakers, and audio endpoints
- CONTRIBUTING.md with fork/setup/test/PR instructions
- PR template with checklist and change type categories
@shaulams shaulams merged commit ac29db8 into main Mar 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant